Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Added types for runtime config. #14584

Merged
merged 3 commits into from
Jan 20, 2021

Conversation

sainthkh
Copy link
Contributor

User facing changelog

Added types for config properties appended at runtime.

Additional details

  • Why was this change necessary? => Some runtime config properties are not defined in the type file.
  • What is affected by this change? => N/A

Any implementation details to explain?

I got the list of runtime config properties with the code below:

it('t', () => {
  console.log(Cypress.config())
})

And compared the list of options in server/lib/config_options.ts.

How has the user experience changed?

N/A

Questions

  • I intentionally left some explanations for some properties as ??? because it's hard to guess or track the meaning of them.
  • I intentionally grouped and left no explanation for internal or unlisted properties.

PR Tasks

I intentionally didn't add tests because config types are not tested in the cli tests.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 15, 2021

Thanks for taking the time to open a PR!

cli/types/cypress.d.ts Outdated Show resolved Hide resolved
cli/types/cypress.d.ts Outdated Show resolved Hide resolved
cli/types/cypress.d.ts Outdated Show resolved Hide resolved
cli/types/cypress.d.ts Outdated Show resolved Hide resolved
cli/types/cypress.d.ts Outdated Show resolved Hide resolved
cli/types/cypress.d.ts Outdated Show resolved Hide resolved
cli/types/cypress.d.ts Outdated Show resolved Hide resolved
cli/types/cypress.d.ts Outdated Show resolved Hide resolved
cli/types/cypress.d.ts Outdated Show resolved Hide resolved
socketId: null | string
socketIoCookie: string
socketIoRoute: string
spec: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could see this also being useful to document.

@sainthkh
Copy link
Contributor Author

@jennifer-shehane Thank you for the feedback. I applied them.

@jennifer-shehane jennifer-shehane merged commit 012d58c into cypress-io:develop Jan 20, 2021
pashidlos pushed a commit to pashidlos/cypress that referenced this pull request Jan 30, 2021
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

We need to provide types for resolved config object
3 participants